package com.sl.au.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import java.util.Date;

/**
 * 公司信息表
 */
@Entity
@Table(name = "sl_crm_news")
public class News extends Root {
	// 标题
	@Column(name = "sTitle")
	private String title;
	// 内容
	@Column(name = "sContent")
	private String content;
	// 类型
	@Column(name = "sType")
	private String type;
	// 发布者
	@Column(name = "sIsuser")
	private String isuser;
	// 发布时间
	@Column(name = "dCreateTime")
	private Date createTime;

	// 发布状态
	@Column(name = "nIsPublished")
	private int isPublished;
	//查看次数
	@Column(name = "nWatchNumber")
	private Integer nWatchNumber;

	public Integer getnWatchNumber() {
		return nWatchNumber;
	}

	public void setnWatchNumber(Integer nWatchNumber) {
		this.nWatchNumber = nWatchNumber;
	}

	/** user_id */
	@ManyToOne
	@JoinColumn(unique = false)
	private User user;

	@Override
	public Date getCreateTime() {
		return createTime;
	}

	@Override
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	/**附件个数 */
	@Transient
	private java.lang.Integer attachNumber;
	
	public java.lang.Integer getAttachNumber() {
		return attachNumber;
	}

	public void setAttachNumber(java.lang.Integer attachNumber) {
		this.attachNumber = attachNumber;
	}

	public String getIsuser() {
		return isuser;
	}

	public void setIsuser(String isuser) {
		this.isuser = isuser;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public int getIsPublished() {
		return isPublished;
	}

	public void setIsPublished(int isPublished) {
		this.isPublished = isPublished;
	}
}
